package com.kgc.scd.service.impl;

import com.kgc.scd.mapper.CategoryMapper;
import com.kgc.scd.mapper.CouponMapper;
import com.kgc.scd.service.CategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created On : 2022/6/13.
 * <p>
 * Author     : nainai
 * <p>
 * Description: CategoryServiceImpl
 */
@Slf4j
@Service
public class CategoryServiceImpl implements CategoryService {

    @Autowired(required = false)
    private CouponMapper couponMapper;

    @Autowired(required = false)
    private CategoryMapper categoryMapper;

    @Override
    public boolean checkCidIsExist(Integer cid) {
        log.info("查看优惠券：{}是否存在", cid);

        return categoryMapper.selectByPrimaryKey(cid) != null;
    }


}
